<?php

namespace App\Models\AppCrash;

use App\Models\BaseModel;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\HasMany;

class AppCrashMainModel extends BaseModel
{
    use HasFactory;

    protected $table = "app_crash_main";

    protected $fillable = [
        "eventType",
        "timestamp",
        "isEncrypt",
        "appId",
        "platformId",
        "appName",
        "date",
        "appUrl",
        "signature",
    ];

    /**
     * @return HasMany
     */
    public function appCrashDetailRel(): HasMany
    {
        return $this->hasMany(AppCrashDetailModel::class, "mainId", "id");
    }
}
